package com.qut.system_1.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;


import java.util.List;
import java.util.Map;
@Mapper
public interface UserMapper {
    @Insert("insert into t_user_info(loginName,loginPwd,userName,userSex,userEmail,userBirthday)" +
         " values(#{loginName},md5(#{loginPwd}),#{userName},#{userSex},#{userEmail},#{userBirthday})")
   int save(Map<String,String> param);
//  List<Map<String,Object>> search(Map<String,String> param);


    List<Map<String,Object>> search1(Map<String,String> param);
//    List<Map<String,Object>> searchPhone(Map<String,String> param);
    List<Map<String,Object>> search(Map<String,String> param);

    int delete(Map<String,String> param);

    @Update("update t_user_info" +
            " set loginName=#{loginName}," +
            " loginPwd=md5(#{loginPwd})" +
            " where userId=#{userId}")
    int update(Map<String,String> param);
    int batchDelete(String[] ids);
}
